package cn.crc.model.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the blog_Category table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="blog_Category"
 */

public abstract class BaseBlogCategory  implements Serializable {

	public static String REF = "BlogCategory";
	public static String PROP_CATE_ORDER = "CateOrder";
	public static String PROP_CATE_URL = "CateUrl";
	public static String PROP_CATE_NAME = "CateName";
	public static String PROP_CATE_LOCAL = "CateLocal";
	public static String PROP_CATE_COUNT = "CateCount";
	public static String PROP_CATE_OUTLINK = "CateOutlink";
	public static String PROP_CATE_ICON = "CateIcon";
	public static String PROP_CATE_SECRET = "CateSecret";
	public static String PROP_CATE_INTRO = "CateIntro";
	public static String PROP_ID = "Id";
	public static String PROP_CATE_LOCK = "CateLock";


	// constructors
	public BaseBlogCategory () {
		initialize();		
	}

	//constructiors for all properties
	public BaseBlogCategory(
		java.lang.Integer cateOrder,
		java.lang.String cateUrl,
		java.lang.String cateName,
		java.lang.Integer cateLocal,
		java.lang.Integer cateCount,
		boolean cateOutlink,
		java.lang.String cateIcon,
		boolean cateSecret,
		java.lang.String cateIntro,
		java.lang.String id,
		boolean cateLock){
		this.setCateOrder(cateOrder);
		this.setCateUrl(cateUrl);
		this.setCateName(cateName);
		this.setCateLocal(cateLocal);
		this.setCateCount(cateCount);
		this.setCateOutlink(cateOutlink);
		this.setCateIcon(cateIcon);
		this.setCateSecret(cateSecret);
		this.setCateIntro(cateIntro);
		this.setId(id);
		this.setCateLock(cateLock);
		initialize();		
	 }
	
	
	

	/**
	 * Constructor for primary key
	 */
	public BaseBlogCategory (java.lang.String id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseBlogCategory (
		java.lang.String id,
		boolean cateOutlink,
		boolean cateLock,
		boolean cateSecret) {

		this.setId(id);
		this.setCateOutlink(cateOutlink);
		this.setCateLock(cateLock);
		this.setCateSecret(cateSecret);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.String id;

	// fields
	private java.lang.String cateName;
	private java.lang.Integer cateOrder;
	private java.lang.String cateIntro;
	private boolean cateOutlink;
	private java.lang.String cateUrl;
	private boolean cateLock;
	private java.lang.String cateIcon;
	private java.lang.Integer cateCount;
	private java.lang.Integer cateLocal;
	private boolean cateSecret;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="cate_ID"
     */
	public java.lang.String getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.String id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: cate_Name
	 */
	public java.lang.String getCateName () {
		return cateName;
	}

	/**
	 * Set the value related to the column: cate_Name
	 * @param cateName the cate_Name value
	 */
	public void setCateName (java.lang.String cateName) {
		this.cateName = cateName;
	}



	/**
	 * Return the value associated with the column: cate_Order
	 */
	public java.lang.Integer getCateOrder () {
		return cateOrder;
	}

	/**
	 * Set the value related to the column: cate_Order
	 * @param cateOrder the cate_Order value
	 */
	public void setCateOrder (java.lang.Integer cateOrder) {
		this.cateOrder = cateOrder;
	}



	/**
	 * Return the value associated with the column: cate_Intro
	 */
	public java.lang.String getCateIntro () {
		return cateIntro;
	}

	/**
	 * Set the value related to the column: cate_Intro
	 * @param cateIntro the cate_Intro value
	 */
	public void setCateIntro (java.lang.String cateIntro) {
		this.cateIntro = cateIntro;
	}



	/**
	 * Return the value associated with the column: cate_OutLink
	 */
	public boolean isCateOutlink () {
		return cateOutlink;
	}

	/**
	 * Set the value related to the column: cate_OutLink
	 * @param cateOutlink the cate_OutLink value
	 */
	public void setCateOutlink (boolean cateOutlink) {
		this.cateOutlink = cateOutlink;
	}



	/**
	 * Return the value associated with the column: cate_URL
	 */
	public java.lang.String getCateUrl () {
		return cateUrl;
	}

	/**
	 * Set the value related to the column: cate_URL
	 * @param cateUrl the cate_URL value
	 */
	public void setCateUrl (java.lang.String cateUrl) {
		this.cateUrl = cateUrl;
	}



	/**
	 * Return the value associated with the column: cate_Lock
	 */
	public boolean isCateLock () {
		return cateLock;
	}

	/**
	 * Set the value related to the column: cate_Lock
	 * @param cateLock the cate_Lock value
	 */
	public void setCateLock (boolean cateLock) {
		this.cateLock = cateLock;
	}



	/**
	 * Return the value associated with the column: cate_icon
	 */
	public java.lang.String getCateIcon () {
		return cateIcon;
	}

	/**
	 * Set the value related to the column: cate_icon
	 * @param cateIcon the cate_icon value
	 */
	public void setCateIcon (java.lang.String cateIcon) {
		this.cateIcon = cateIcon;
	}



	/**
	 * Return the value associated with the column: cate_count
	 */
	public java.lang.Integer getCateCount () {
		return cateCount;
	}

	/**
	 * Set the value related to the column: cate_count
	 * @param cateCount the cate_count value
	 */
	public void setCateCount (java.lang.Integer cateCount) {
		this.cateCount = cateCount;
	}



	/**
	 * Return the value associated with the column: cate_local
	 */
	public java.lang.Integer getCateLocal () {
		return cateLocal;
	}

	/**
	 * Set the value related to the column: cate_local
	 * @param cateLocal the cate_local value
	 */
	public void setCateLocal (java.lang.Integer cateLocal) {
		this.cateLocal = cateLocal;
	}



	/**
	 * Return the value associated with the column: cate_Secret
	 */
	public boolean isCateSecret () {
		return cateSecret;
	}

	/**
	 * Set the value related to the column: cate_Secret
	 * @param cateSecret the cate_Secret value
	 */
	public void setCateSecret (boolean cateSecret) {
		this.cateSecret = cateSecret;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof cn.crc.model.BlogCategory)) return false;
		else {
			cn.crc.model.BlogCategory blogCategory = (cn.crc.model.BlogCategory) obj;
			if (null == this.getId() || null == blogCategory.getId()) return false;
			else return (this.getId().equals(blogCategory.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}